package chapter4.No4_1_使用reentrantLock类.demo10;

/**
 * *：实现生产者/消费者模式：多对多交替打印
 * Created by Administrator on 2016/11/21.
 */
public class Main {
    public static void main(String[] args) {
        ServiceClass sc = new ServiceClass();
        ThreadSet[] threadSets = new ThreadSet[10];
        ThreadGet[] threadGets = new ThreadGet[10];
        for(int i = 0; i < 10; i++) {
            threadSets[i] = new ThreadSet(sc);
            threadGets[i] = new ThreadGet(sc);

            threadSets[i].start();
            threadGets[i].start();
        }
    }
}
